/*--------------------------------*- C++ -*---------------------------------*\ 
| ========                 |                                                 | 
| \      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \    /   O peration     | Version:  plus                                  | 
|   \  /    A nd           | Web:      www.OpenFOAM.com                      | 
|    \/     M anipulation  |                                                 | 
\*--------------------------------------------------------------------------*/ 
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object blockMeshDict;
}

convertToMeters 1;

MeshCross1 12;
MeshCross2 8;
MeshUpDownSec 6;
MeshDesignBendSec 9;
MeshDesignSec 10;

ratio1 0.1;
ratio2 10.0;
ratio3 0.1;

vertices  
(
    ( 0.4695 0.0195 -0.0)
    ( 0.4695 0.0945 -0.0)
    ( 0.4695 0.0195 0.0375)
    ( 0.4695 0.0945 0.0375)
    
    ( 0.75 0.0195 -0.0)
    ( 0.75 0.0945 -0.0)
    ( 0.75 0.0195 0.0375)
    ( 0.75 0.0945 0.0375)

    ( 0.4695 -0.0195 -0.0)
    ( 0.4695 -0.0945 -0.0)
    ( 0.4695 -0.0195 0.0375)
    ( 0.4695 -0.0945 0.0375)

    ( 0.75 -0.0195 -0.0)
    ( 0.75 -0.0945 -0.0)
    ( 0.75 -0.0195 0.0375)
    ( 0.75 -0.0945 0.0375)
    
    ( 0.7695 0 -0.0)
    ( 0.7695 0 0.0375)
    ( 0.8445 0 -0.0)
    ( 0.8445 0 0.0375)

    ( 0 0.0195 -0.0)
    ( 0 0.0945 -0.0)
    ( 0 0.0195 0.0375)
    ( 0 0.0945 0.0375)

    ( 0 -0.0195 -0.0)
    ( 0 -0.0945 -0.0)
    ( 0 -0.0195 0.0375)
    ( 0 -0.0945 0.0375)

);

edges  
(
    arc  4 16  ( 0.76378858223313767673 0.01378858223313767673 -0.0)
    arc  6 17  ( 0.76378858223313767673 0.01378858223313767673 0.0375)

    arc 12 16  ( 0.76378858223313767673 -0.01378858223313767673 -0.0)
    arc 14 17  ( 0.76378858223313767673 -0.01378858223313767673 0.0375)

    arc  5 18  ( 0.81682159082212874106 0.06682159082212874106 -0.0)
    arc  7 19  ( 0.81682159082212874106 0.06682159082212874106 0.0375)

    arc 13 18   ( 0.81682159082212874106 -0.06682159082212874106 -0.0)
    arc 15 19  ( 0.81682159082212874106 -0.06682159082212874106 0.0375)
);

blocks  
(

    hex (0 4 5 1 2 6 7 3) ($MeshDesignSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        $ratio3 // x expansion ratio
        (  // y expansion ratio
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )

    hex (4 16 18 5 6 17 19 7) ($MeshDesignBendSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        1.0
        (
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )

    hex (13 18 16 12 15 19 17 14) ($MeshDesignBendSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        1.0
        (
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )
    hex (9 13 12 8 11 15 14 10) ($MeshDesignSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        $ratio3
        (
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )

    hex (20 0 1 21 22 2 3 23) ($MeshUpDownSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        1
        (
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )

    hex (25 9 8 24 27 11 10 26) ($MeshUpDownSec $MeshCross1 $MeshCross2) 
    simpleGrading 
    (
        1
        (
            (0.5 0.5 $ratio2)
            (0.5 0.5 $ratio1)
        )
        $ratio1
    )

);


patches  
( 

  patch inlet
  (
    (20 21 23 22)
  ) 
  patch outlet
  (
    (25 24 26 27)
  )
  wall ubend
  (     
    (0 4 6 2)
    (1 5 7 3)
    (2 3 7 6)
    (4 16 17 6)
    (6 17 19 7)
    (5 18 19 7)
    (13 15 19 18)
    (12 16 17 14)
    (14 17 19 15)
    (9 11 15 13)
    (8 12 14 10)
    (11 15 14 10)
    (27 26 10 11)
    (26 24 8 10)
    (25 27 11 9)
  )

  symmetry sym
  (
    (0 4 5 1)
    (4 16 18 5)
    (13 18 16 12)
    (9 13 12 8)
    (20 21 1 0)
    (25 24 8 9)
  )

  wall ubendup
  (
    (22 23 3 2)
    (21 23 3 1)
    (20 22 2 0)
  )


);

mergePatchPairs  
(
);
